<route lang="json5">
{
  meta: {
    auth: true,
  },
}
</route>

<template>
  <div class="h-full overflow-y-scroll scrollbar p-5 scrollbar-thumb-gray-900">
    <div>/ 根目录:</div>
    <div class="my-2 bg-gray-400 w-min px-4 py-2 whitespace-nowrap">COUNT: {{ count }}</div>
    <a-button @click="addOne">count+1</a-button>
    <a-button
      @click="
        () => {
          router.push({ name: 'demo-2' })
        }
      "
    >
      /demo/2
    </a-button>
    <div class="mockup-code mt-4">
      <pre data-prefix="$"><code>npm i daisyui</code></pre>
      <pre data-prefix=">" class="text-warning"><code>installing...</code></pre>
      <pre data-prefix=">" class="text-success"><code>Done!</code></pre>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { useAccount } from '@pinia/account'

const router = useRouter()

const accoutStore = useAccount()
const { count } = storeToRefs(accoutStore)

function addOne() {
  count.value += 1
}
</script>
